<%@ page import="java.util.ArrayList" %>
<%@ page import="com.huage_07.User" %>
<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户表格</title>
</head>
<body>
    <%
        ArrayList<User> userList = new ArrayList<User>();
        userList.add(new User("张三",23,new Date()));
        userList.add(new User("李四",24,new Date()));
        userList.add(new User("王五",25,new Date()));

        request.setAttribute("userList",userList);
    %>
    <table border="1" width="500" align="center">
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>出生日期</td>
        </tr>
        <c:forEach items="${userList}" var="user" varStatus="s">
            <tr>
                <td>${s.count}</td>
                <td>${user.name}</td>
                <td>${user.age}</td>
                <td>${user.birStr}</td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
